/**
 * 
 */
package io;

import java.io.IOException;
import java.util.TreeSet;

import dataTypes.ISequenceData;

public interface ISequenceReader {

	/**
	 * Loads all (defined in the ISequenceData) data associated with specified
	 * gene. If the gene is not found in the associated file(s) or the specified
	 * file(s) is corrupt an IOException is thrown.
	 * 
	 * @param geneName
	 *            exact name of the gene to load
	 * @return
	 * @throws IOException
	 */
	public ISequenceData loadSequence(String seqName) throws IOException;

	/**
	 * Reads all sequence names from the sequence file associated with the
	 * reader. Throws IOException if there is something wrong with the file.
	 * 
	 * @return TreeSet containing all sequence names.
	 * @throws IOException
	 */
	public TreeSet<String> readAllNames() throws IOException;

	/**
	 * Load the next sequence in the file (from the last invocation of this
	 * method).
	 * 
	 * @return
	 * @throws IOException
	 */
	public ISequenceData loadNext() throws IOException;
}
